package com.dhcc.bpm.modules.scf.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dhcc.bpm.modules.scf.dto.ScfTruckInfoDTO;
import com.dhcc.bpm.modules.scf.entity.ScfTruckInfo;
import com.dhcc.bpm.modules.scf.vo.ScfTruckInfoVO.ScfGetTruckDetailsVO;
import com.dhcc.bpm.modules.scf.vo.ScfTruckInfoVO.ScfGetTruckListVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;


public interface IScfTruckInfoService extends IService<ScfTruckInfo> {

    /**
     * 自定义查询列表
     *
     * @param page
     * @param scfTruckInfo
     * @return
     */
    IPage<ScfGetTruckListVO> selectScfTruckInfoPage(IPage<ScfGetTruckListVO> page, ScfTruckInfoDTO scfTruckInfo);

    /**
     * 查看车辆详细信息
     *
     * @param scfTruckInfo
     * @return
     */
    ScfGetTruckDetailsVO getDetails(ScfTruckInfoDTO scfTruckInfo);

    /**
     * 新增车辆详情信息
     *
     * @param scfTruckInfo
     * @return
     */
    Boolean saveTruck(ScfTruckInfoDTO scfTruckInfo) throws Exception;

    /**
     * 导入车辆详情信息
     *
     * @param scfTruckInfos
     * @return
     */
    int bachSaveTruck(List<ScfTruckInfo> scfTruckInfos, String operatorId);

    /**
     * 更新车辆详细信息
     *
     * @param scfTruckInfo
     * @return
     */
    Boolean updateTruck(ScfTruckInfoDTO scfTruckInfo);

    /**
     * 车辆信息-批量导入
     * 当前用户ID
     *
     * @param file
     * @return
     */
    List<ScfTruckInfo> batchSaveScfTruckInfo(String operatorId, MultipartFile file) throws IOException;

    /**
     * 车辆信息 - 批量删除
     * @param split
     * @return
     */
    Boolean deleteByIds(String[] split);
}
